<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateClientTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('client', function (Blueprint $table) {
            $table->increments('id');
            $table->string('chinese_name')->comment('公司中文名');
            $table->string('english_name')->comment('英文名称');
            $table->string('abbreviation_name')->comment('公司简称');
            $table->string('replace_name')->comment('替代名称');
            $table->string('url')->comment('公司网站地址');
            $table->string('contacts')->comment('公司联系人');
            $table->string('duties')->comment('职务');
            $table->unsignedInteger('sex')->default(3)->comment('性别 1男,2女,3不详');
            $table->unsignedInteger('country_code')->comment('国家区号');
            $table->string('phone')->comment('手机');
            $table->string('company_phone')->comment('公司电话');
            $table->string('email')->comment('Email');
            $table->string('related_url')->comment('其它相关网址');
            $table->string('company_address')->comment('公司地址');
            $table->string('area')->comment('所在地区');
            $table->text('brief')->comment('公司简介及福利');
            $table->text('demand')->comment('利益诉求');
            $table->unsignedInteger('uid')->nullable()->index()->comment('创建者ID');
            $table->unsignedInteger('assign')->nullable()->index()->comment('任务归属用户');
            $table->unsignedInteger('assign_time')->nullable()->comment('归属到期时间');
            $table->unsignedTinyInteger('share')->default(1)->comment('是否共享');
            $table->tinyInteger('status')->default(1)->index()->comment('状态：-1删除，0禁用，1启用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('client');
    }
}
